# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libvisual
pkgver=0.4.0
pkgrel=8
pkgdesc="Abstraction library that comes between applications and audio visualisation plugins"
arch=('x86_64')
url="https://sourceforge.net/projects/libvisual/"
license=('LGPL')
depends=('glibc')
source=("https://downloads.sourceforge.net/sourceforge/libvisual/libvisual-${pkgver}.tar.gz"
        "libvisual-0.4.0-inlinedefineconflict.patch")
sha256sums=('0b4dfdb87125e129567752089e3c8b54cefed601eef169d2533d8659da8dc1d7'
            '5221aadfdd6ba752e9bf45d6f2b0133357f7e3e7cf286c1b36807cc2e0df5a0a')

prepare() {
  cd ${pkgname}-${pkgver}

  # libvisual's definition of "inline" causes issues when compiling with the
  # new C++11 ABI (patch from Fedora)
  patch -Np1 -i ../libvisual-0.4.0-inlinedefineconflict.patch
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}
